<template>
<!--  完结项目-->
<div>
  <el-row>
    <el-col :span="3" >
      <el-input
        placeholder="输入关键字进行过滤"
        v-model="filterText"
      style="padding:10px">
      </el-input>
      <el-tree
        class="filter-tree"
        :data="data"
        :props="defaultProps"
        default-expand-all
        :filter-node-method="filterNode"
        ref="tree">
      </el-tree>
    </el-col>
    <el-col :span="21">
      <el-table :data="projectList" :header-cell-style="{backgroundColor: '#e7f6f3'}" @row-click="onClick('wjxm')"
                style="margin: 10px">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="xmmc" label="项目名称" show-overflow-tooltip></el-table-column>
        <el-table-column prop="xmbh" label="项目编号" show-overflow-tooltip></el-table-column>
        <el-table-column prop="jhks" label="开始日期" show-overflow-tooltip></el-table-column>
        <el-table-column prop="jhjs" label="结束日期" show-overflow-tooltip></el-table-column>
        <el-table-column prop="hours" label=工时 show-overflow-tooltip></el-table-column>
        <el-table-column prop="status" label="项目状态" show-overflow-tooltip></el-table-column>
        <el-table-column prop="operation" label="操作">
        </el-table-column>
      </el-table>
      <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum"
                  :limit.sync="queryParams.pageSize" style="margin: 0 25px 28px;"/>
    </el-col>
  </el-row>
</div>
</template>

<script>
export default {
  name: "complatedProject",
  data(){
    return{
      total:0,
      queryParams:{
        pageNum:1,
        pageSize:10
      },
      filterText:'',
      data:[
        {
          id: 1,
          label: '项目类型',
          children: [{
            id: 11,
            label: '防沙治沙',
          },{
            id: 12,
            label: '植树造林',
          },{
            id: 13,
            label: '绿化改造',
          },{
            id: 14,
            label: '机器人造林',
          },
          ]
        },
      ],
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      projectList:[
        {xmmc:'风光一体化防沙治沙',xmbh:'FGYT23684325',jhks:'2022-09-01',jhjs:'2023-09-01',sjks:'2022-09-01',hours:'100',status:'完成' },
        {xmmc:'三北六期',xmbh:'FGYT23684325',jhks:'2022-09-01',jhjs:'2023-09-01',sjks:'2022-09-01',hours:'75',status:'完成' },
        {xmmc:'蚂蚁森林',xmbh:'FGYT23684325',jhks:'2022-09-01',jhjs:'2023-09-01',sjks:'2022-09-01',hours:'78',status:'完成' },
        {xmmc:'蓝旗机器人造林',xmbh:'FGYT23684325',jhks:'2022-09-01',jhjs:'2023-09-01',sjks:'2022-09-01',hours:'22',status:'完成' },
      ]
    }
  },
  mounted() {
    this.total = this.projectList.length
  },
  methods:{
    filterNode(){},
    onClick(value){
      let param = {
        value:value
      }
      this.$emit('showProjectSystem',param)
    }
  }
}
</script>

<style scoped>

</style>
